package com.lhz.controller;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.lhz.services.ReportService;
import com.lhz.vo.GoodsVo;

@Controller
@RequestMapping("/report")
public class ReportControll {
	
	
	@Autowired
	private ReportService service;
	
/*	
	
	@RequestMapping("/toReport")
	public ModelAndView toReport() {
		ModelAndView mv=new ModelAndView();
		mv.setViewName("report");
		return mv;
	}
	*/
	
	/**
	 * 商品上周销量报表
	 * @return
	 */
	@RequestMapping("/toReport")
	public ModelAndView seachByNumReport() {
		ModelAndView mv=new ModelAndView();
		Map<String, Object> list = service.prevWeekSellsNumReport();
		Map<String, Object> list2 = service.prevMonthSellsNumReport();
		Map<String,Object> list3 = service.monthYurnoverReport();//上三月营业额日报表（折线图）
		Map<Integer, Object> list4 = service.yearYurnoverReport();
		Map<Integer, Object> list5 = service.yearsTurnoverReport();
			mv.addObject("list", list);
			mv.addObject("list2", list2);
			mv.addObject("list3", list3);
			mv.addObject("list4", list4);
			mv.addObject("list5", list5);
			mv.setViewName("report");
		return mv;
	}
	
	
	
	
	
	
}
